<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model \common\modules\user\frontend\models\LoginForm */

$this->title = Yii::t('frontend', 'Login');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-login">
	<h1><?= Html::encode($this->title) ?></h1>

	<div class="row">
		<div class="col-lg-5">
            <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
                <?= $form->field($model, 'identity')?>
                <?= $form->field($model, 'password')->passwordInput()?>
                <?= $form->field($model, 'rememberMe')->checkbox()?>
                <div style="color: #999; margin: 1em 0">
                    <?=Yii::t('frontend', 'If you forgot your password you can reset it <a href="{link}">here</a>', ['link' => yii\helpers\Url::to(['sign-in/request-password-reset'])])?>
                </div>
			<div class="form-group">
                <?= Html::submitButton(Yii::t('frontend', 'Login'), ['class' => 'btn btn-primary', 'name' => 'login-button'])?>
            </div>
			<div class="form-group">
                <?= Html::a(Yii::t('frontend', 'Need an account? Sign up.'), ['signup'])?>
            </div>
			<h2><?= Yii::t('frontend', 'Log in with')  ?>:</h2>
			<div class="form-group">
                <?=yii\authclient\widgets\AuthChoice::widget(['baseAuthUrl' => ['/user/sign-in/auth']])?>
            </div>
            <?php ActiveForm::end(); ?>
        </div>
	</div>
</div>
